Optimal. Leaf size=54 \[ \frac {b x}{2}+\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x) \sin (c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2713,
2715, 8} \begin {gather*} -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {b \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 3872
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \, dx &=a \int \cos ^3(c+d x) \, dx+b \int \cos ^2(c+d x) \, dx\\ &=\frac {b \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} b \int 1 \, dx-\frac {a \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {b x}{2}+\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x) \sin (c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 57, normalized size = 1.06 \begin {gather*} \frac {b (c+d x)}{2 d}+\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d}+\frac {b \sin (2 (c+d x))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 49, normalized size = 0.91
method | result | size |
risch | \(\frac {b x}{2}+\frac {3 a \sin \left (d x +c \right )}{4 d}+\frac {a \sin \left (3 d x +3 c \right )}{12 d}+\frac {b \sin \left (2 d x +2 c \right )}{4 d}\) | \(48\) |
derivativedivides | \(\frac {\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(49\) |
default | \(\frac {\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(49\) |
norman | \(\frac {\frac {\left (2 a -b \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (2 a +b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b x}{2}+\frac {4 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {3 b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(124\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 46, normalized size = 0.85 \begin {gather*} -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} b}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.43, size = 42, normalized size = 0.78 \begin {gather*} \frac {3 \, b d x + {\left (2 \, a \cos \left (d x + c\right )^{2} + 3 \, b \cos \left (d x + c\right ) + 4 \, a\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 98 vs.
\(2 (48) = 96\).
time = 0.44, size = 98, normalized size = 1.81 \begin {gather*} \frac {3 \, {\left (d x + c\right )} b + \frac {2 \, {\left (6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.83, size = 55, normalized size = 1.02 \begin {gather*} \frac {b\,x}{2}+\frac {2\,a\,\sin \left (c+d\,x\right )}{3\,d}+\frac {b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}+\frac {a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________